<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>timeline</title>
</head>
<body>
  <button id="btn">Add</button>
  <script>
    const arrList = [];
    function test() {
      for (let i = 0; i < 1000; i++) {
        document.body.appendChild(document.createElement('p'));
      }
      arrList.push(new Array(1000000).join('x'));
      console.log(arrList);
    }
    document.getElementById('btn').addEventListener('click', test)
  </script>
</body>
</html>